<?php

/**
 * 卖家日志模型
 */

namespace app\common\model;

use think\Db;

class SellerLog extends \think\Model
{

    /**
     * 读取列表 
     * @param array $condition
     *
     */
    public function getSellerLogList($condition, $limit = 9999, $order = '', $field = '*', $page = 1)
    {
        return Db::name('seller_log')->field($field)->where($condition)->limit($limit)->page($page)->order($order)->select();
    }

    /**
     * 读取单条记录
     * @param array $condition
     *
     */
    public function getSellerLogInfo($condition)
    {
        return Db::name('seller_log')->where($condition)->find();
    }

    /*
     * 增加 
     * @param array $param
     * @return bool
     */

    public function addSellerLog($param)
    {
        return Db::name('seller_log')->insert($param, false, true);
    }

    /*
     * 删除
     * @param array $condition
     * @return bool
     */

    public function delSellerLog($condition)
    {
        if (!$condition) {
            return true;
        }
        return Db::name('seller_log')->where($condition)->delete();
    }

}
